From df3dbfbe3f9350232aff22439a90ce9b1f77f839 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 18 Nov 2009 15:10:32 +0000 Subject: [PATCH] Delbin: Report internal error. --- delbin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/delbin.c b/delbin.c index 2359de58d..48b499f41 100644 --- a/delbin.c +++ b/delbin.c @@ -151,6 +151,7 @@ static waypoint** wp_array; #define MSG_CAPABILITIES 0xb001 #define MSG_DELETE 0xb005 #define MSG_DELETE_SIZE 67 +#define MSG_ERROR 0xa003 #define MSG_NAVIGATION 0xa010 #define MSG_REQUEST_ROUTES 0xb051 #define MSG_REQUEST_ROUTES_SIZE 65 @@ -772,6 +773,10 @@ message_read(unsigned msg_id, message_t* m) if (id == 0) { break; } + if (id == MSG_ERROR) { + const gbuint8* p = m->data; + fatal(MYNAME ": device error %u: \"%s\"\n", *p, p + 1); + } message_ack(id, m); if (id == msg_id || time(NULL) - time_start >= READ_TIMEOUT) { break; -- 2.30.2